import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: { //状态管理

  },
  getters: {},
  mutations: { //更改状态
    userinfo(state, userinfo) {
      localStorage.setItem("userinfo", JSON.stringify(userinfo))
      state.userinfo = JSON.parse(localStorage.getItem("userinfo"))
    }
  },
  actions: {},
  modules: {}
})